package com.sjd.mall.domain.dto.shoppingcart;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 购物车添加
 *
 * @author seer
 * @date 2022/1/12 23:55
 */
@ApiModel
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
public class WxShoppingCartAddRequestDTO {

    @ApiModelProperty(
            value = "商品ID",
            required = true
    )
    @NotNull(message = "goodsId is null")
    private Long goodsId;

    @ApiModelProperty(
            value = "数量",
            required = true,
            allowableValues = ">1"
    )
    @NotNull(message = "goodsQuantity is null")
    private BigDecimal goodsQuantity;

}
